<template>
  <div>
    <div class="projectManageCompany-detail">
      <span class="title">基本信息</span>
      <FormGroup
        ref="formRef"
        style="margin-top: 20px"
        :search-config="addPopFormConfig"
        label-width="120px"
        label-position="right"
      >
        <el-form-item
          slot="competitionType"
          class="layout-item require-items"
          props="comManageVal"
          label="参赛类型"
        >
          <el-select
            v-model="localFormParams.entryType"
            size="small"
            :multiple="false"
            clearable
            :disabled="popType === 'view'"
            :style="{ width: '250px'}"
            @change="handleChooseComType"
          >
            <el-option
              v-for="ele in comTypeOptions"
              :key="ele.value"
              :label="ele.label"
              :value="ele.value"
            />
          </el-select>
          <div style="display: flex;justify-content: flex-start;margin-top: 10px;">
            <span>输入团队最大人数限制: </span>
            <el-input v-model="localFormParams.itemPeopleNum" placeholder="请输入内容" :disabled="popType === 'view' || localFormParams.entryType === 1" style="width: 180px;margin-left: 10px;" />
          </div>
        </el-form-item>

        <el-form-item
          slot="competitionPlan"
          class="layout-item require-items"
          props="comManageVal"
          label="赛程安排"
        >
          <div class="choose-time-row">
            <span class="mr-10 require-items">遴选时间</span>
            <el-date-picker
              v-model="scheduleParams.timeRange1"
              class="mr-10"
              type="datetimerange"
              :disabled="popType === 'view' || scheduleParams.disabled1"
              align="right"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :size="'small'"
              :style="{ width: '350px'}"
              :picker-options="initDisabled"
              @change="(data)=>dateRankChange(data,1)"
            />
            <span class="mr-10">作品截至上传时间</span>
            <el-date-picker
              v-model="scheduleParams.closingDate1"
              type="datetime"
              :disabled="popType === 'view' || scheduleParams.disabled1 || !scheduleParams.timeRange1 || scheduleParams.timeRange1.length === 0"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期时间"
              :size="'small'"
              :style="{ width: '185px'}"
              :picker-options="limitDate1"
            />
          </div>
          <div class="choose-time-row pl-10">
            <span class="mr-10">初赛时间</span>
            <el-date-picker
              v-model="scheduleParams.timeRange2"
              class="mr-10"
              type="datetimerange"
              :disabled="popType === 'view' || scheduleParams.disabled2"
              align="right"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :size="'small'"
              :style="{ width: '350px'}"
              :picker-options="dateRankOption1"
              @change="(data)=>dateRankChange(data,2)"
            />
            <span class="mr-10">作品截至上传时间</span>
            <el-date-picker
              v-model="scheduleParams.closingDate2"
              type="datetime"
              :disabled="popType === 'view' || scheduleParams.disabled2 || !scheduleParams.timeRange2 || scheduleParams.timeRange2.length === 0"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期时间"
              :size="'small'"
              :style="{ width: '185px'}"
              :picker-options="limitDate2"
            />
          </div>
          <div class="choose-time-row pl-10">
            <span class="mr-10">复赛时间</span>
            <el-date-picker
              v-model="scheduleParams.timeRange3"
              class="mr-10"
              type="datetimerange"
              :disabled="popType === 'view' || scheduleParams.disabled3"
              align="right"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :size="'small'"
              :style="{ width: '350px'}"
              :picker-options="dateRankOption2"
              @change="(data)=>dateRankChange(data,3)"
            />
            <span class="mr-10">作品截至上传时间</span>
            <el-date-picker
              v-model="scheduleParams.closingDate3"
              type="datetime"
              :disabled="popType === 'view' || scheduleParams.disabled3 || !scheduleParams.timeRange3 || scheduleParams.timeRange3.length === 0"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期时间"
              :size="'small'"
              :style="{ width: '185px'}"
              :picker-options="limitDate3"
            />
          </div>
          <div class="choose-time-row">
            <span class="mr-10 require-items">决赛时间</span>
            <el-date-picker
              v-model="scheduleParams.timeRange4"
              class="mr-10"
              type="datetimerange"
              :disabled="popType === 'view' || scheduleParams.disabled4"
              align="right"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
              :size="'small'"
              :style="{ width: '350px'}"
              :picker-options="dateRankOption3"
              @change="(data)=>dateRankChange(data,4)"
            />
            <span class="mr-10">作品截至上传时间</span>
            <el-date-picker
              v-model="scheduleParams.closingDate4"
              type="datetime"
              :disabled="popType === 'view' || scheduleParams.disabled4 || !scheduleParams.timeRange4 || scheduleParams.timeRange4.length === 0"
              format="yyyy-MM-dd HH"
              value-format="yyyy-MM-dd HH:mm:ss"
              placeholder="选择日期时间"
              :size="'small'"
              :style="{ width: '185px'}"
              :picker-options="limitDate4"
            />
          </div>
        </el-form-item>
        <el-form-item
          slot="pingShenWays"
          class="layout-item require-items"
          props="comManageVal"
          label="评选办法"
        >
          <div class="audit-row">
            <span class="mb-10">评审规则</span>
            <EditorCom
              v-if="popType !== 'view'"
              ref="editor"
              v-model="localFormParams.reviewRules"
              :disabled="popType === 'view'"
              height="300px"
              :style="{ width: '80%' }"
            />

            <p v-else :style="viewEditStyle" v-html="localFormParams.reviewRules" />
            <!-- <el-input
                          v-else
                          class="mb-10"
                          v-model="localFormParams.reviewRules"
                          type="textarea"
                          disabled
                          :rows="5"
                          :autosize="{ minRows: 4, maxRows: 8 }"
                          :style="{ width: '500px'}"
                          size="small"
                      /> -->
            <span class="mb-10">评审工作要求</span>
            <EditorCom
              v-if="popType !== 'view'"
              ref="editor"
              v-model="localFormParams.reviewRequire"
              :disabled="popType === 'view'"
              height="300px"
              :style="{ width: '80%' }"
            />
            <p v-else :style="viewEditStyle" v-html="localFormParams.reviewRequire" />
            <!-- <el-input
                          v-else
                          v-model="localFormParams.reviewRequire"
                          type="textarea"
                          disabled
                          :rows="5"
                          :autosize="{ minRows: 4, maxRows: 8 }"
                          :style="{ width: '500px'}"
                          size="small"
                      /> -->
          </div>
        </el-form-item>
        <el-form-item
          slot="comFiles"
          class="layout-item"
          props="comManageVal"
          label="比赛资料"
        >
          <span style="margin-right: 10px;">学生比赛用材料</span>
          <el-radio-group v-model="localFormParams.annexDownType" :disabled="popType === 'view'">
            <el-radio :key="1" :label="1">已报名可下载</el-radio>
            <el-radio :key="2" :label="2">入初赛可下栽</el-radio>
          </el-radio-group>
          <!-- <PdfUpload
                      v-model="filesVal"
                      :is-show-tip="false"
                      :file-type="['.pdf']"
                      :limit="999"
                      :file-size="20"
                  /> -->
          <UnloadFileTable v-model="annexList" style="width: 600px" :disabled="popType === 'view'" />
        </el-form-item>
        <el-form-item
          slot="video"
          class="layout-item"
          props="comManageVal"
          label="比赛资料"
        >
          <VideoPlayer
            ref="video"
            :src="localFormParams.videoUrl"
            :autoplay="false"
            @onPlay="videoPlay"
          />
        </el-form-item>
      </FormGroup>

    </div>
    <div v-if="!isHideBtns" class="btn-footer">
      <el-button @click="handleClose">取 消</el-button>
      <el-button type="primary" @click="handleConfirm">确 定</el-button>
      <span style="color: #409eff;cursor: pointer;margin-left: 10px;" @click="handleView">查看</span>
    </div>
    <PreviewDetail ref="previewDetail" />
  </div>
</template>
<script>
import { addPopFormConfig } from '../initData'
import { createApi, getProDetail, editApi } from './../api'
import FormGroup from '@/views/components/FormGroup'
import EditorCom from '@/components/Editor/newEdit.vue'
import VideoPlayer from '@/components/videoPlayer'
import PreviewDetail from './previewDetail'
import UnloadFileTable from '@/views/projectManageCompany/projectResultShow/components/unloadFileTable.vue'

import moment from 'moment'
export default {
  name: 'AddPop',
  components: {
    FormGroup,
    EditorCom,
    VideoPlayer,
    UnloadFileTable,
    PreviewDetail
  },
  props: {
    isHideBtns: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      dialogVisible: false,
      addPopFormConfig: JSON.parse(JSON.stringify(addPopFormConfig)),
      src: '',
      popType: '',
      detail: '',
      columnList: [],
      id: '',
      comTypeOptions: [
        // 1:个人;2:团队;3:个人或团队
        {
          label: '个人',
          value: 1
        },
        {
          label: '团队',
          value: 2
        },
        {
          label: '个人或团队',
          value: 3
        }
      ],
      comManageVal: '',
      filesVal: '',
      localFormParams: {
        entryType: '', // 参赛类型
        itemPeopleNum: null, // 参赛团队最大人数
        reviewRules: '', // 评审规则
        reviewRequire: '', // 评审工作要求
        annexDownType: null // 比赛材料下载类型;1:已报名可下载,2:入选初赛可下载
      },
      scheduleParams: {
        closingDate1: '',
        timeRange1: [],
        closingDate2: '',
        timeRange2: [],
        closingDate3: '',
        timeRange3: [],
        closingDate4: '',
        timeRange4: []
      },
      videoUrl: '',
      viewEditStyle: {
        'width': '800px',
        'min-height': '200px',
        'max-height': '500px',
        'overflow': 'auto',
        'border': '1px solid #ccc',
        'border-radius': '4px',
        'padding': '0 5px',
        'background': '#F5F7FA'
      },
      annexList: [],
      initDisabled: {
        // 返回禁用时间
        disabledDate(time) {
          // 获取当前时间的年月日
          const currentDate = new Date().toDateString()
          // 获取当前时间的时分秒
          const currentTime = new Date().toLocaleTimeString()
          // 获取考虑选择的时间的年月日
          const timeDate = new Date(time).toDateString()
          // 获取考虑选择的时间的时分秒
          const startTime = new Date(time).toLocaleTimeString()
          // 如果选择的起始日期与当前日期相同，则判断选择的起始时分秒是否大于当前时分秒
          if (timeDate === currentDate) {
            return startTime < currentTime
          }
          // 如果选择的起始日期大于当前日期，则允许选择此日期范围
          return time < new Date()
          // return time.getTime() < Date.now();  // 可选历史天、可选当前天、不可选未来天
          // return time.getTime() > Date.now() - 8.64e7;  // 可选历史天、不可选当前天、不可选未来天
        //   return time.getTime() < Date.now() // 不可选历史天、可选当前天、可选未来天
          // return time.getTime() < Date.now(); // 不可选历史天、不可选当前天、可选未来天
        }
      }
    }
  },
  computed: {
    // 遴选阶段，截止日期限制
    limitDate1() {
      if (Array.isArray(this.scheduleParams.timeRange1) && this.scheduleParams.timeRange1.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange1[0])
      } else {
        return this.initDisabled
      }
    },
    // 初赛阶段，截止日期限制
    limitDate2() {
      if (Array.isArray(this.scheduleParams.timeRange2) && this.scheduleParams.timeRange2.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange2[0])
      } else {
        return this.initDisabled
      }
    },
    // 复赛阶段，截止日期限制
    limitDate3() {
      if (Array.isArray(this.scheduleParams.timeRange3) && this.scheduleParams.timeRange3.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange3[0])
      } else {
        return this.initDisabled
      }
    },
    // 决赛阶段，截止日期限制
    limitDate4() {
      if (Array.isArray(this.scheduleParams.timeRange4) && this.scheduleParams.timeRange4.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange4[0])
      } else {
        return this.initDisabled
      }
    },
    // 初赛阶段，日期限制
    dateRankOption1() {
      if (Array.isArray(this.scheduleParams.timeRange1) && this.scheduleParams.timeRange1.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange1[1])
      } else {
        return this.initDisabled
      }
    },
    // 复赛阶段，日期限制
    dateRankOption2() {
      if (Array.isArray(this.scheduleParams.timeRange2) && this.scheduleParams.timeRange2.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange2[1])
      } else if (Array.isArray(this.scheduleParams.timeRange1) && this.scheduleParams.timeRange1.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange1[1])
      } else {
        return this.initDisabled
      }
    },
    // 决赛阶段，日期限制
    dateRankOption3() {
      if (Array.isArray(this.scheduleParams.timeRange3) && this.scheduleParams.timeRange3.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange3[1])
      } else if (Array.isArray(this.scheduleParams.timeRange2) && this.scheduleParams.timeRange2.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange2[1])
      } else if (Array.isArray(this.scheduleParams.timeRange1) && this.scheduleParams.timeRange1.length > 0) {
        return this.disabledOptionFn(this.scheduleParams.timeRange1[1])
      } else {
        return this.initDisabled
      }
    }

  },
  methods: {
    dateRankChange(data, index) {
      switch (index) {
        case 1:
          this.scheduleParams.timeRange2 = null
          this.scheduleParams.timeRange3 = null
          this.scheduleParams.timeRange4 = null
          this.scheduleParams.closingDate1 = ''
          this.scheduleParams.closingDate2 = ''
          this.scheduleParams.closingDate3 = ''
          this.scheduleParams.closingDate4 = ''
          break
        case 2:
          this.scheduleParams.timeRange3 = null
          this.scheduleParams.timeRange4 = null
          this.scheduleParams.closingDate2 = ''
          this.scheduleParams.closingDate3 = ''
          this.scheduleParams.closingDate4 = ''
          break
        case 3:
          this.scheduleParams.timeRange4 = null
          this.scheduleParams.closingDate3 = ''
          this.scheduleParams.closingDate4 = ''
          break
        case 4:
          this.scheduleParams.closingDate4 = ''
          break
      }
    },
    /**
     * @description return 返回日期选择禁止的配置
     * @param {*} limiTime 'YYYY-MM-DD HH:mm:ss' moment格式
     */
    disabledOptionFn(limiTime) {
      return {
        // 返回禁用时间
        disabledDate(time) {
          if (limiTime) {
            return time.getTime() < moment(limiTime).valueOf()
          } else {
            // return time.getTime() < Date.now();  // 可选历史天、可选当前天、不可选未来天
            // return time.getTime() > Date.now() - 8.64e7;  // 可选历史天、不可选当前天、不可选未来天
            return time.getTime() < Date.now() // 不可选历史天、可选当前天、可选未来天
            // return time.getTime() < Date.now(); // 不可选历史天、不可选当前天、可选未来天
          }
        }
      }
    },
    async getNewsStudyInfo(id, API) {
      let res = {}
      if (API) {
        res = await API(id)
      } else {
        res = await getProDetail(id)
      }
      const { code, data } = res
      const newConfig = JSON.parse(JSON.stringify(addPopFormConfig))
      if (code === 0) {
        this.handleShowBakData(data)
        const keys = Object.keys(data)
        keys.forEach((v) => {
          newConfig.forEach(ele => {
            if (ele.keyIndex === v) {
              ele.value = data[v]
            }
            if (ele.keyIndex === 'projectTypeId') {
              ele.options = this.columnList
            }

            if (this.popType === 'view') {
              ele.disabled = true

              if (ele.type === 'edit') {
                ele.type = 'editview'
                ele.style = this.viewEditStyle
              }
              if (ele.type === 'video') {
                ele.slot = 'video'
              }
            }
          })
        })
        this.addPopFormConfig = newConfig
      }
    },
    handleShowBakData(data) {
      this.annexList = data.annexVOList
      this.localFormParams = {
        ...data
      }
      const list = data.scheduleVOList || []
      const data1 = list.find(v => v.scheduleType === 1) || {}
      const data2 = list.find(v => v.scheduleType === 2) || {}
      const data3 = list.find(v => v.scheduleType === 3) || {}
      const data4 = list.find(v => v.scheduleType === 4) || {}
      const disabled1 = data1.startTime && new Date(data1.startTime) < new Date()
      const disabled2 = data2.startTime && new Date(data2.startTime) < new Date()
      const disabled3 = data3.startTime && new Date(data3.startTime) < new Date()
      const disabled4 = data4.startTime && new Date(data4.startTime) < new Date()
      this.scheduleParams = {
        closingDate1: data1.closingDate ? data1.closingDate + '' : '',
        timeRange1: data1.startTime ? [data1.startTime + '', data1.endTime + ''] : [],
        disabled1,
        closingDate2: data2.closingDate ? data2.closingDate + '' : '',
        timeRange2: data2.startTime ? [data2.startTime + '', data2.endTime + ''] : [],
        disabled2,
        closingDate3: data3.closingDate ? data3.closingDate + '' : '',
        timeRange3: data3.startTime ? [data3.startTime + '', data3.endTime + ''] : [],
        disabled3,
        closingDate4: data4.closingDate ? data4.closingDate + '' : '',
        timeRange4: data4.startTime ? [data4.startTime + '', data4.endTime + ''] : [],
        disabled4
      }
    },
    open({ popType, id, columnList, API = null }) {
      this.id = id
      this.popType = popType
      this.dialogVisible = true
      this.columnList = columnList
      if (popType === 'edit' || popType === 'view') {
        this.getNewsStudyInfo(id, API)
      } else {
        const newConfig = JSON.parse(JSON.stringify(addPopFormConfig))
        newConfig.forEach(ele => {
          if (ele.keyIndex === 'projectTypeId') {
            ele.options = this.columnList
          }
        })
        this.addPopFormConfig = newConfig
      }
      this.$nextTick(() => {
        this.$refs.formRef && this.$refs.formRef.resetFields()
      })
    },
    handleClose() {
      this.addPopFormConfig = JSON.parse(JSON.stringify(addPopFormConfig))
      this.dialogVisible = false
      this.localFormParams = {}
      this.scheduleParams = {
        closingDate1: '',
        timeRange1: [],
        closingDate2: '',
        timeRange2: [],
        closingDate3: '',
        timeRange3: [],
        closingDate4: '',
        timeRange4: ''
      }
      this.annexList = []
      this.$emit('handleClose')
    },
    videoPlay() {},
    //   选择参赛类型
    handleChooseComType(value) {
      if (value === 1) {
        this.localFormParams.itemPeopleNum = 1
      } else {
        this.localFormParams.itemPeopleNum = null
      }
    },
    async getParams() {
      const fromParams = this.$refs.formRef && await this.$refs.formRef.getParams()
      const scheduleList = this.localFormParams.scheduleVOList || []
      const scheduleItem1 = scheduleList.find(v => v.scheduleType === 1) || {}
      const scheduleItem2 = scheduleList.find(v => v.scheduleType === 2) || {}
      const scheduleItem3 = scheduleList.find(v => v.scheduleType === 3) || {}
      const scheduleItem4 = scheduleList.find(v => v.scheduleType === 4) || {}
      const scheduleVOList = [
        {
          closingDate: this.scheduleParams.closingDate1,
          endTime: this.scheduleParams.timeRange1 ? this.scheduleParams.timeRange1[1] : '',
          id: scheduleItem1.id || '',
          projectId: scheduleItem1.projectId || '',
          scheduleType: 1, // 类型;1:遴选;2:初赛;3:复赛;4:决赛;
          startTime: this.scheduleParams.timeRange1 ? this.scheduleParams.timeRange1[0] : ''
        },
        {
          closingDate: this.scheduleParams.closingDate2,
          endTime: this.scheduleParams.timeRange2 ? this.scheduleParams.timeRange2[1] : '',
          id: scheduleItem2.id || '',
          projectId: scheduleItem2.projectId || '',
          scheduleType: 2, // 类型;1:遴选;2:初赛;3:复赛;4:决赛;
          startTime: this.scheduleParams.timeRange2 ? this.scheduleParams.timeRange2[0] : ''
        },
        {
          closingDate: this.scheduleParams.closingDate3,
          endTime: this.scheduleParams.timeRange3 ? this.scheduleParams.timeRange3[1] : '',
          id: scheduleItem3.id || '',
          projectId: scheduleItem3.projectId || '',
          scheduleType: 3, // 类型;1:遴选;2:初赛;3:复赛;4:决赛;
          startTime: this.scheduleParams.timeRange3 ? this.scheduleParams.timeRange3[0] : ''
        },
        {
          closingDate: this.scheduleParams.closingDate4,
          endTime: this.scheduleParams.timeRange4 ? this.scheduleParams.timeRange4[1] : '',
          id: scheduleItem4.id || '',
          projectId: scheduleItem4.projectId || '',
          scheduleType: 4, // 类型;1:遴选;2:初赛;3:复赛;4:决赛;
          startTime: this.scheduleParams.timeRange4 ? this.scheduleParams.timeRange4[0] : ''
        }
      ]

      const timeList = scheduleVOList.filter(v => v.startTime && v.endTime && v.closingDate)
      const params = {
        entryType: this.localFormParams.entryType, // 参赛类型
        itemPeopleNum: this.localFormParams.itemPeopleNum, // 参赛团队最大人数
        reviewRules: this.localFormParams.reviewRules, // 评审规则
        reviewRequire: this.localFormParams.reviewRequire, // 评审工作要求
        annexDownType: this.localFormParams.annexDownType,
        ...fromParams,
        scheduleVOList: timeList,
        annexVOList: this.annexList
      }
      return params
    },

    async handleConfirm() {
      if (this.popType === 'view') {
        this.handleClose()
        return
      }
      if (!this.scheduleParams.closingDate1 || !this.scheduleParams.timeRange1 || this.scheduleParams.timeRange1.length === 0) {
        this.$message.warning('请选择遴选时间')
        return
      }
      if (!this.scheduleParams.closingDate4 || !this.scheduleParams.timeRange4 || this.scheduleParams.timeRange4.length === 0) {
        this.$message.warning('请选择决赛时间')
        return
      }
      if (this.annexList && this.annexList.length > 0 && !this.localFormParams.annexDownType) {
        this.$message.warning('请选择学生比赛用材料')
        return
      }
      const params = await this.getParams()
      this[this.popType](params)
    },
    async add(fromParams) {
      const params = {
        ...fromParams,
        status: 0
      }
      const { code, msg } = await createApi(params)
      if (code !== 0) {
        this.$message.error(msg)
        return
      }
      this.dialogVisible = false
      this.$message.success('保存成功')
      this.$emit('addSuccess')
    },
    async edit(fromParams) {
      const params = {
        ...fromParams,
        id: this.localFormParams.id,
        status: this.localFormParams.status
      }
      const { code, msg } = await editApi(params)
      if (code !== 0) {
        this.$message.error(msg)
        return
      }
      this.dialogVisible = false
      this.$message.success('保存成功')
      this.$emit('addSuccess')
    },

    async handleView() {
      const params = await this.getParams()
      this.$refs.previewDetail && this.$refs.previewDetail.open({ info: params })
    }
  }
}
</script>

<style lang="scss" scoped>

  .basic-infos {
    max-height: 80vh;
    overflow: auto;
  }

  .mb-10 {
      margin-bottom: 10px;
  }
  .mr-10 {
      margin-right: 10px;
  }
  .pl-10 {
    padding-left: 10px;
  }
  .choose-time-row {
      display: flex;
      justify-content: flex-start;
      margin-bottom: 10px;
  }

  .audit-row {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
  }

  .layout-item {
    display: flex;
  }

  .btn-footer {
    display: flex;
    justify-content: center;
    align-items: flex-end;
  }
</style>
<style lang="scss">
.projectManageCompany-detail {
  .require-items {
    .el-form-item__label:before {
      content: "*";
      color: #ff4949;
      margin-right: 4px;
    }
  }

  span.require-items:before {
    content: "*";
    color: #ff4949;
    margin-right: 4px;
  }
}

</style>
